﻿#pragma once


#include "Containers/ThreadSafePtr.h"
#include "TextureFormat.h"

class CWriteInTextureCube;

class CRenderTextureCube
{

public:
    CRenderTextureCube();

    //主线程向渲染线程同步数据
    //仅在数据变化时调用一次
    void SyncToRenderThread(
        const uint32_t InWidth,
        const uint32_t InHeight,
        const uint32_t InPitch,
        ETextureFormat InFormat,
        const TVector<uint8_t>& InFront,
        const TVector<uint8_t>& InBack,
        const TVector<uint8_t>& InLeft,
        const TVector<uint8_t>& InRight,
        const TVector<uint8_t>& InTop,
        const TVector<uint8_t>& InBottom
    );

    // vk::Image GetImage() const
    // {
    //     return Image;
    // }

    // vk::ImageView GetImageView() const
    // {
    //     return ImageView;
    // }

    // vk::Sampler GetSampler() const
    // {
    //     return Sampler;
    // }

    // vk::Extent2D GetImageSize() const
    // {
    //     return ImageSize;
    // }


    //render thread read and consume the data wrote by main thread
    //void MakeSureNotDirty();

    //std::shared_ptr<CVulkanTextureCube> VulkanTextureCube;

    TThreadSafeSharedPtr<CWriteInTextureCube> GetWriteInTexture() const
    {
        return WriteInTexture;
    }
protected:


    TThreadSafeSharedPtr<CWriteInTextureCube> WriteInTexture;
};